import request from '@/utils/request';
import settings from '../../../config/defaultSettings';
export async function GetMenuByPage(params: any) {
  return request(`${settings.prefixUrl}/system/menu/getMenuByPage`, {
    method: 'POST',
    data: params,
  });
}

export async function GetMenuTree() {
  return request(`${settings.prefixUrl}/system/menu/getMenuTree`, {
    method: 'POST',
    // data: params,
  });
}

export async function AddMenu(params: any) {
  return request(`${settings.prefixUrl}/system/menu/addMenu`, {
    method: 'POST',
    data: params,
  });
}

export async function updateMenu(params: any) {
  return request(`${settings.prefixUrl}/system/menu/updateMenu`, {
    method: 'POST',
    data: params,
  });
}

export async function DelMenu(params: any) {
  return request(`${settings.prefixUrl}/system/menu/delMenu`, {
    method: 'POST',
    data: params,
  });
}
